A good answer might be:

Not hard at all. Just one method needs to be changed---the access method that implements the rule. If the variables were not marked private and an access method were not used, making this small change might involve looking over every line of the entire program for places that accessed the variables.


Encapsulation

The programming technique we have been talking about is called encapsulation.

Encapsulation means hiding the details of an object from the other parts of a program. The object can be used only through its access methods, which are carefully written to keep the object consistent and secure.

Encapsulation makes an object look like a black box: The insides of the box are hidden from view. On the outside are some controls which are the only way that the user can use the box.

The usual example of this is a TV set where most of the inner workings are sealed off from the user. The user interacts with the set using some well-defined controls. The controls are sometimes called the user interface. In object oriented programming, the programmer should try to make the interface to the object simple and useful. The inner workings of the object should be made private.


QUESTION 7:

(Thought question: ) Do you think that it is possible to have a private method?